package com.fs.uc.base.repo;

import com.fs.uc.base.domain.CheckCode;
import io.quarkus.hibernate.orm.panache.PanacheRepository;

import javax.enterprise.context.ApplicationScoped;

/**
 * @author 崔超
 * 2021/12/8
 */
@ApplicationScoped
public class CheckCodeRepository implements PanacheRepository<CheckCode> {
    static final String PHONE_FIELD = "phone";

    public CheckCode findByPhone(String phone) {
        return find(PHONE_FIELD,phone).firstResult();
    }

}
